package IMIC.DOTHEVINH.OOP.EXERCISES.LEVEL02.EXP1;

public class Models {
	public double Area(TriangleEntity triangleEntity) {
		double p = (triangleEntity.getSide1() + triangleEntity.getSide2() + triangleEntity.getSide3()) / 2;
		double area = Math.sqrt(p * (p - triangleEntity.getSide1()) * (p - triangleEntity.getSide2())
				* (p - triangleEntity.getSide3()));
		return area;

	}

	public double Perimeter(TriangleEntity triangleEntity) {
		double perimeter = triangleEntity.getSide1() + triangleEntity.getSide2() + triangleEntity.getSide3();
		return perimeter;

	}
}
